def guess(n, a, b, i):
    if n == a or n == b:
        print(i, n)
    elif n > (a+b)/2:
        if (a+b)%2 == 0:
            a = (a+b)/2
        else:
            a = (a+b+1)/2
        i = i + 1
        guess(n, a, b, i)
    else:
        if (a+b)%2 == 0:
            b = (a+b)/2
        else:
            b = (a+b+1)/2
        i = i + 1
        guess(n, a, b, i)


guess(24, 0, 100, 1)

        